import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { HttpService } from 'src/app/service/http.service';

@Component({
  selector: 'app-contacts-detail',
  templateUrl: './contacts-detail.component.html',
  styleUrls: ['./contacts-detail.component.scss'],
})
export class ContactsDetailComponent implements OnInit {

  friend: any;

  constructor(private activtedRoute: ActivatedRoute, private router: Router, private httpService: HttpService) { }

  ngOnInit() {
    //获取参数值
    console.log(this.activtedRoute.snapshot.queryParams);
    this.httpService.getFriend(this.activtedRoute.snapshot.queryParams.friendId).then(result => {
      console.log(result)
      this.friend = result.data
    })
  }
}
